import {createStore, applyMiddleware} from 'redux';
import reducer from './reducers';
import createSagaMiddleware from '../redux-saga';
import rootSaga from './saga/autoSaga'

let sagaMiddleware = createSagaMiddleware();
let store = applyMiddleware(sagaMiddleware)(createStore)(reducer);
//sagaMiddleware就是个执行器，可启动helloSaga这个generator的执行
sagaMiddleware.run(rootSaga);
export default store;
